package in.iqing.model.bean;

import com.lidroid.xutils.db.annotation.Column;
import com.lidroid.xutils.db.annotation.Finder;
import com.lidroid.xutils.db.annotation.Id;
import com.lidroid.xutils.db.annotation.NoAutoIncrement;
import com.lidroid.xutils.db.annotation.Table;

/**
 * Created by ZuoShu on 15/7/14.
 */
@Table(name = "bookmark")
public class History {
    @Id
    @NoAutoIncrement
    @Column(column = "book_id")
    private int bookId;

    @Column(column = "chapter_id")
    private int chapterId;

    @Column(column = "bookmark")
    private long bookmark;

    @Column(column = "time")
    private long time;

    @Finder(valueColumn = "book_id", targetColumn = "id")
    private Book book;

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public int getChapterId() {
        return chapterId;
    }

    public void setChapterId(int chapterId) {
        this.chapterId = chapterId;
    }

    public long getBookmark() {
        return bookmark;
    }

    public void setBookmark(long bookmark) {
        this.bookmark = bookmark;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public Book getBook() {
        return book;
    }

    public void setBook(Book book) {
        this.book = book;
    }

    @Override
    public String toString() {
        return "History{" +
                "bookId=" + bookId +
                ", chapterId=" + chapterId +
                ", bookmark=" + bookmark +
                ", time=" + time +
                '}';
    }
}
